<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib prefix="dwz" uri="http://www.lyjuan.cn/dwz/tags" %>

<form id="pagerForm" method="post" action="<dwz:url url="group/groupList"/>">
	<input type="hidden" name="pageNum" value="<c:out value="${param.pageNum}" default="1"/>" />
	<input type="hidden" name="name" value="${param.name}" />
	<input type="hidden" name="actionurl" value="${param.actionurl}" />
</form>

<div class="pageHeader">
	<form onsubmit="return navTabSearch(this);" action="<dwz:url url="group/groupList"/>" method="post">
	<div class="searchBar">
		<table class="searchContent">
			<tr>
				<td>
					名称：<input type="text" name="name" value="${param.name}"/>
				</td>
				<td>
                    状态：
					<select name="status">
						<option value="">全部</option>
						<option value="1" <c:if test="${param.status == '1'}">selected="selected"</c:if>>正常</option>
						<option value="0" <c:if test="${param.status == '0'}">selected="selected"</c:if>>锁定</option>
					</select>
				</td>
            </tr>
            <tr>
				<td>
					<div class="buttonActive">
						<div class="buttonContent">
							<button type="submit">检索</button>
						</div>
					</div>
				</td>
			</tr>
		</table>
	</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li>
                <dwz:elt htmlName="a" url="to/group/preAddGroup" rel="group_preAddGroup"
                       target="dialog" class="add" ><span>添加</span></dwz:elt>
            </li>
		</ul>
	</div>
	<div layoutH="116">
	<table class="table" width="100%" layoutH="138">
		<thead>
			<tr>
				<th width="30px">序号</th>
                <th width="150px">操作</th>
				<th>名称</th>
				<th>状态</th>
				<th>排序</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${groups}" var="list" varStatus="status">
				<tr target="sid" rel="${list.id}">
					<td>${status.index + 1}</td>
                    <td width="150px">
                        <dwz:elt htmlName="a" url="group/preUpdateGroup" data="id=${list.id}" rel="group_preUpdateGroup"
                                 target="dialog" height="200" width="400">修改/&nbsp;</dwz:elt>
                        <dwz:elt htmlName="a" url="action/preAddAction" data="groupid=${list.id}" rel="group_preAddGroup"
                                 target="dialog" height="350" width="400">添加请求/&nbsp;</dwz:elt>
                        <dwz:elt htmlName="a" url="action/actionList" data="groupid=${list.id}" rel="action_actionList"
                                 target="navTab" >所属请求</dwz:elt>
                    </td>
					<td>${list.name}</td>
					<td>
						<c:if test="${list.status == 1}">正常</c:if>
						<c:if test="${list.status == 0}">锁定</c:if>
					</td>
					<td>${list.sort}</td>
				</tr>
			</c:forEach>
		</tbody>
	</table>
	</div>
	
	<div class="panelBar">
		<div class="pages">
			<span>共&nbsp;${totalCount}&nbsp;条</span>
		</div>
		<div class="pagination" targetType="navTab" totalCount="${totalCount}" numPerPage="${numPerPage}" pageNumShown="10" currentPage="${pageNum}"></div>
	</div>
</div>
